package com.ship.service.impl;

import com.ship.entity.bo.Advert;
import com.ship.mapper.AdvertMapper;
import com.ship.service.AdvertService;
import com.ship.util.DateUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.Date;
import java.util.List;

/**
*
* @Author CodeGenerator
* @date 2016-12-08 14:34:55
*
**/
@Service("advertService")
public class AdvertServiceImpl extends BaseServiceImpl<Advert> implements AdvertService {
    @Resource
    private AdvertMapper advertMapper;

    private Logger logger = LoggerFactory.getLogger(AdvertServiceImpl.class);

    @Override
    public List<Advert> queryAdvert(String type) {
        return advertMapper.queryAdvert(DateUtils.formatDate(new Date(),"yyyy-MM-dd HH:mm"),type);
    }
}